/*
 * @Author: funlee 
 * @Email: i@funlee.cn 
 * @Date: 2017-12-11 17:38:11 
 * @Last Modified time:   2017-12-11 17:38:11 
 * @Description: 限制缩放范围
 */
import ol from 'openlayers'
import 'openlayers/dist/ol.css'

export default () => {
  new ol.Map({
    layers: [
      new ol.layer.Tile({
        source: new ol.source.OSM()
      })
    ],
    view: new ol.View({
      // 设置成都为地图中心
      center: [104.06, 30.67],
      // 指定投影使用EPSG:4326
      projection: 'EPSG:4326',
      zoom: 10,
      // 限制地图缩放最大级别为14，最小级别为10
      minZoom: 10,
      maxZoom: 14
    }),
    target: 'map'
  });
}
